<h1><%= title "Traits" %></h1>

<table>
  <tr>
    <th></th>
	<th>Name</th>
    <th>Type</th>
    <th>Description</th>
  </tr>

<% for trait in @traits %>
  <tr>
    <td><img src="<%= trait.icon %>"/></td>
    <td><%=h trait.name %></td>
    <td><%=h trait.category_name %></td>
    <td><%=h trait.description %> <ul><%= list_trait_effects trait %></ul></td>
    <td><%= link_to 'Show', trait %></td>
    <td><%= link_to 'Edit', edit_trait_path(trait) %></td>
    <td><%= link_to 'Destroy', trait, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New trait', new_trait_path %> | <%= link_to 'Home', '/' %>
